package com.itheima.file;

import java.io.File;
import java.io.IOException;

public class Demo02 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("day11_lianxi\\a.txt");
        //System.out.println(file1.createNewFile());
        System.out.println("是否是文件：" + file1.isFile());
        System.out.println("是否是目录：" + file1.isDirectory());
        System.out.println("是否存在：" + file1.exists());
        System.out.println("名字：" + file1.getName());
        System.out.println("路径：" + file1.getAbsolutePath());
        File file2 = new File("day11_lianxi\\aaa");
        //System.out.println(file2.mkdirs());
        System.out.println("是否是文件：" + file2.isFile());
        System.out.println("是否是目录：" + file2.isDirectory());
        System.out.println("是否存在：" + file2.exists());
        System.out.println("名字：" + file2.getName());
        System.out.println("路径：" + file2.getAbsolutePath());


    }
}
